package com.guijq.selfcode.javase;

/**
 * @author yangjf
 * @time 2019-06-18 11:10
 */
public class Test82 {
    public static void main(String[] args) {
        int[] array = {8,4,2,3,5};
        for (int i = 0; i < array.length-1; i++) {
            for (int j = 0; j < array.length -1 - i; j++) {
                if (array[j] > array[j + 1]) {
                    int temp = array[j];
                    array[j] = array[j + 1];
                    array[j + 1] = temp;
                }
            }
        }
        for (int k : array) {
            System.out.println(k);
        }
    }
}
